package com.leen.user.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author 
 * 用户账单表
 */
@Table(name="yx_user_bill")
@Data
@Entity
@ApiModel(value = "用户账单表")
public class YxUserBill implements Serializable {
    /**
     * 用户账单id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "用户账单id")
    private Long id;

    /**
     * 用户uid
     */
    @Column(name = "uid")
    @ApiModelProperty(value = "用户uid")
    private Long uid;

    /**
     * 关联id
     */
    @Column(name = "link_id")
    @ApiModelProperty(value = "关联id")
    private String linkId;

    /**
     * （进出帐）0 = 支出 1 = 获得
     */
    @Column(name = "pm")
    @ApiModelProperty(value = "0 = 支出 1 = 获得")
    private Byte pm;

    /**
     * 账单标题
     */
    @Column(name = "title")
    @ApiModelProperty(value = "账单标题")
    private String title;

    /**
     * 明细种类
     */
    @Column(name = "category")
    @ApiModelProperty(value = "明细种类")
    private String category;

    /**
     * 明细类型
     */
    @Column(name = "type")
    @ApiModelProperty(value = "明细类型")
    private String type;

    /**
     * 明细数字
     */
    @Column(name = "number")
    @ApiModelProperty(value = "明细数字")
    private BigDecimal number;

    /**
     * 剩余
     */
    @Column(name = "balance")
    @ApiModelProperty(value = "剩余")
    private BigDecimal balance;

    /**
     * 备注
     */
    @Column(name = "mark")
    @ApiModelProperty(value = "备注")
    private String mark;

    /**
     * 添加时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "添加时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 0 = 带确定 1 = 有效 -1 = 无效
     */
    @Column(name = "status")
    @ApiModelProperty(value = "0 = 带确定 1 = 有效 -1 = 无效")
    private Byte status;


    @Column(name = "is_del")
    @ApiModelProperty(value = "is_del")
    private Byte del;


}